3.1.89 \(\int \frac {(f+g x)^2}{a+b \log (c (d+e x)^n)} \, dx\) [89]

3.1.89.1 Optimal result
3.1.89.2 Mathematica [A] (verified)
3.1.89.3 Rubi [A] (verified)
3.1.89.4 Maple [C] (warning: unable to verify)
3.1.89.5 Fricas [A] (verification not implemented)
3.1.89.6 Sympy [F]
3.1.89.7 Maxima [F]
3.1.89.8 Giac [A] (verification not implemented)
3.1.89.9 Mupad [F(-1)]

3.1.89.1 Optimal result

Integrand size = 24, antiderivative size = 219 \[ \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx=\frac {e^{-\frac {a}{b n}} (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{b e^3 n}+\frac {2 e^{-\frac {2 a}{b n}} g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b e^3 n}+\frac {e^{-\frac {3 a}{b n}} g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b e^3 n} \]

output
(-d*g+e*f)^2*(e*x+d)*Ei((a+b*ln(c*(e*x+d)^n))/b/n)/b/e^3/exp(a/b/n)/n/((c* 
(e*x+d)^n)^(1/n))+2*g*(-d*g+e*f)*(e*x+d)^2*Ei(2*(a+b*ln(c*(e*x+d)^n))/b/n) 
/b/e^3/exp(2*a/b/n)/n/((c*(e*x+d)^n)^(2/n))+g^2*(e*x+d)^3*Ei(3*(a+b*ln(c*( 
e*x+d)^n))/b/n)/b/e^3/exp(3*a/b/n)/n/((c*(e*x+d)^n)^(3/n))
 
3.1.89.2 Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.90 \[ \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx=\frac {e^{-\frac {3 a}{b n}} (d+e x) \left (c (d+e x)^n\right )^{-3/n} \left (e^{\frac {2 a}{b n}} (e f-d g)^2 \left (c (d+e x)^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )-g (d+e x) \left (-2 e^{\frac {a}{b n}} (e f-d g) \left (c (d+e x)^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )-g (d+e x) \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )\right )\right )}{b e^3 n} \]

input
Integrate[(f + g*x)^2/(a + b*Log[c*(d + e*x)^n]),x]
 
output
((d + e*x)*(E^((2*a)/(b*n))*(e*f - d*g)^2*(c*(d + e*x)^n)^(2/n)*ExpIntegra 
lEi[(a + b*Log[c*(d + e*x)^n])/(b*n)] - g*(d + e*x)*(-2*E^(a/(b*n))*(e*f - 
 d*g)*(c*(d + e*x)^n)^n^(-1)*ExpIntegralEi[(2*(a + b*Log[c*(d + e*x)^n]))/ 
(b*n)] - g*(d + e*x)*ExpIntegralEi[(3*(a + b*Log[c*(d + e*x)^n]))/(b*n)])) 
)/(b*e^3*E^((3*a)/(b*n))*n*(c*(d + e*x)^n)^(3/n))
 
3.1.89.3 Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2846, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx\)

\(\Big \downarrow \) 2846

\(\displaystyle \int \left (\frac {(e f-d g)^2}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {2 g (d+e x) (e f-d g)}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {g^2 (d+e x)^2}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 g e^{-\frac {2 a}{b n}} (d+e x)^2 (e f-d g) \left (c (d+e x)^n\right )^{-2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b e^3 n}+\frac {e^{-\frac {a}{b n}} (d+e x) (e f-d g)^2 \left (c (d+e x)^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{b e^3 n}+\frac {g^2 e^{-\frac {3 a}{b n}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b e^3 n}\)

input
Int[(f + g*x)^2/(a + b*Log[c*(d + e*x)^n]),x]
 
output
((e*f - d*g)^2*(d + e*x)*ExpIntegralEi[(a + b*Log[c*(d + e*x)^n])/(b*n)])/ 
(b*e^3*E^(a/(b*n))*n*(c*(d + e*x)^n)^n^(-1)) + (2*g*(e*f - d*g)*(d + e*x)^ 
2*ExpIntegralEi[(2*(a + b*Log[c*(d + e*x)^n]))/(b*n)])/(b*e^3*E^((2*a)/(b* 
n))*n*(c*(d + e*x)^n)^(2/n)) + (g^2*(d + e*x)^3*ExpIntegralEi[(3*(a + b*Lo 
g[c*(d + e*x)^n]))/(b*n)])/(b*e^3*E^((3*a)/(b*n))*n*(c*(d + e*x)^n)^(3/n))
 

3.1.89.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2846
Int[((f_.) + (g_.)*(x_))^(q_.)/((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.) 
]*(b_.)), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q/(a + b*Log[c*(d + e* 
x)^n]), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] & 
& IGtQ[q, 0]
 
3.1.89.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.34 (sec) , antiderivative size = 1889, normalized size of antiderivative = 8.63

method result size
risch \(\text {Expression too large to display}\) \(1889\)

input
int((g*x+f)^2/(a+b*ln(c*(e*x+d)^n)),x,method=_RETURNVERBOSE)
 
output
-1/e^3*g^2/b/n*(e*x+d)^3*((e*x+d)^n)^(-3/n)*c^(-3/n)*exp(-3/2*(-I*b*Pi*csg 
n(I*c*(e*x+d)^n)*csgn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e*x+ 
d)^n)^2*b+I*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*b-I*Pi*csgn(I*c*(e* 
x+d)^n)^3*b+2*a)/b/n)*Ei(1,-3*ln(e*x+d)-3/2*(-I*b*Pi*csgn(I*c*(e*x+d)^n)*c 
sgn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2*b+I*Pi*csg 
n(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*b-I*Pi*csgn(I*c*(e*x+d)^n)^3*b+2*b*ln 
(c)+2*b*(ln((e*x+d)^n)-n*ln(e*x+d))+2*a)/b/n)-1/e*f^2/b/n*(e*x+d)*((e*x+d) 
^n)^(-1/n)*c^(-1/n)*exp(-1/2*(-I*b*Pi*csgn(I*c*(e*x+d)^n)*csgn(I*c)*csgn(I 
*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2*b+I*Pi*csgn(I*(e*x+d)^n)* 
csgn(I*c*(e*x+d)^n)^2*b-I*Pi*csgn(I*c*(e*x+d)^n)^3*b+2*a)/b/n)*Ei(1,-ln(e* 
x+d)-1/2*(-I*b*Pi*csgn(I*c*(e*x+d)^n)*csgn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csg 
n(I*c)*csgn(I*c*(e*x+d)^n)^2*b+I*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^ 
2*b-I*Pi*csgn(I*c*(e*x+d)^n)^3*b+2*b*ln(c)+2*b*(ln((e*x+d)^n)-n*ln(e*x+d)) 
+2*a)/b/n)-1/e^3*g^2*d^2/b/n*(e*x+d)*((e*x+d)^n)^(-1/n)*c^(-1/n)*exp(-1/2* 
(-I*b*Pi*csgn(I*c*(e*x+d)^n)*csgn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csgn(I*c)*cs 
gn(I*c*(e*x+d)^n)^2*b+I*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*b-I*Pi* 
csgn(I*c*(e*x+d)^n)^3*b+2*a)/b/n)*Ei(1,-ln(e*x+d)-1/2*(-I*b*Pi*csgn(I*c*(e 
*x+d)^n)*csgn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2* 
b+I*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*b-I*Pi*csgn(I*c*(e*x+d)^n)^ 
3*b+2*b*ln(c)+2*b*(ln((e*x+d)^n)-n*ln(e*x+d))+2*a)/b/n)+2/e^3*d*g^2/b/n...
 
3.1.89.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 192, normalized size of antiderivative = 0.88 \[ \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx=\frac {{\left (g^{2} \operatorname {log\_integral}\left ({\left (e^{3} x^{3} + 3 \, d e^{2} x^{2} + 3 \, d^{2} e x + d^{3}\right )} e^{\left (\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right ) + 2 \, {\left (e f g - d g^{2}\right )} e^{\left (\frac {b \log \left (c\right ) + a}{b n}\right )} \operatorname {log\_integral}\left ({\left (e^{2} x^{2} + 2 \, d e x + d^{2}\right )} e^{\left (\frac {2 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right ) + {\left (e^{2} f^{2} - 2 \, d e f g + d^{2} g^{2}\right )} e^{\left (\frac {2 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )} \operatorname {log\_integral}\left ({\left (e x + d\right )} e^{\left (\frac {b \log \left (c\right ) + a}{b n}\right )}\right )\right )} e^{\left (-\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}}{b e^{3} n} \]

input
integrate((g*x+f)^2/(a+b*log(c*(e*x+d)^n)),x, algorithm="fricas")
 
output
(g^2*log_integral((e^3*x^3 + 3*d*e^2*x^2 + 3*d^2*e*x + d^3)*e^(3*(b*log(c) 
 + a)/(b*n))) + 2*(e*f*g - d*g^2)*e^((b*log(c) + a)/(b*n))*log_integral((e 
^2*x^2 + 2*d*e*x + d^2)*e^(2*(b*log(c) + a)/(b*n))) + (e^2*f^2 - 2*d*e*f*g 
 + d^2*g^2)*e^(2*(b*log(c) + a)/(b*n))*log_integral((e*x + d)*e^((b*log(c) 
 + a)/(b*n))))*e^(-3*(b*log(c) + a)/(b*n))/(b*e^3*n)
 
3.1.89.6 Sympy [F]

\[ \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx=\int \frac {\left (f + g x\right )^{2}}{a + b \log {\left (c \left (d + e x\right )^{n} \right )}}\, dx \]

input
integrate((g*x+f)**2/(a+b*ln(c*(e*x+d)**n)),x)
 
output
Integral((f + g*x)**2/(a + b*log(c*(d + e*x)**n)), x)
 
3.1.89.7 Maxima [F]

\[ \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx=\int { \frac {{\left (g x + f\right )}^{2}}{b \log \left ({\left (e x + d\right )}^{n} c\right ) + a} \,d x } \]

input
integrate((g*x+f)^2/(a+b*log(c*(e*x+d)^n)),x, algorithm="maxima")
 
output
integrate((g*x + f)^2/(b*log((e*x + d)^n*c) + a), x)
 
3.1.89.8 Giac [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 337, normalized size of antiderivative = 1.54 \[ \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx=\frac {f^{2} {\rm Ei}\left (\frac {\log \left (c\right )}{n} + \frac {a}{b n} + \log \left (e x + d\right )\right ) e^{\left (-\frac {a}{b n}\right )}}{b c^{\left (\frac {1}{n}\right )} e n} - \frac {2 \, d f g {\rm Ei}\left (\frac {\log \left (c\right )}{n} + \frac {a}{b n} + \log \left (e x + d\right )\right ) e^{\left (-\frac {a}{b n}\right )}}{b c^{\left (\frac {1}{n}\right )} e^{2} n} + \frac {d^{2} g^{2} {\rm Ei}\left (\frac {\log \left (c\right )}{n} + \frac {a}{b n} + \log \left (e x + d\right )\right ) e^{\left (-\frac {a}{b n}\right )}}{b c^{\left (\frac {1}{n}\right )} e^{3} n} + \frac {2 \, f g {\rm Ei}\left (\frac {2 \, \log \left (c\right )}{n} + \frac {2 \, a}{b n} + 2 \, \log \left (e x + d\right )\right ) e^{\left (-\frac {2 \, a}{b n}\right )}}{b c^{\frac {2}{n}} e^{2} n} - \frac {2 \, d g^{2} {\rm Ei}\left (\frac {2 \, \log \left (c\right )}{n} + \frac {2 \, a}{b n} + 2 \, \log \left (e x + d\right )\right ) e^{\left (-\frac {2 \, a}{b n}\right )}}{b c^{\frac {2}{n}} e^{3} n} + \frac {g^{2} {\rm Ei}\left (\frac {3 \, \log \left (c\right )}{n} + \frac {3 \, a}{b n} + 3 \, \log \left (e x + d\right )\right ) e^{\left (-\frac {3 \, a}{b n}\right )}}{b c^{\frac {3}{n}} e^{3} n} \]

input
integrate((g*x+f)^2/(a+b*log(c*(e*x+d)^n)),x, algorithm="giac")
 
output
f^2*Ei(log(c)/n + a/(b*n) + log(e*x + d))*e^(-a/(b*n))/(b*c^(1/n)*e*n) - 2 
*d*f*g*Ei(log(c)/n + a/(b*n) + log(e*x + d))*e^(-a/(b*n))/(b*c^(1/n)*e^2*n 
) + d^2*g^2*Ei(log(c)/n + a/(b*n) + log(e*x + d))*e^(-a/(b*n))/(b*c^(1/n)* 
e^3*n) + 2*f*g*Ei(2*log(c)/n + 2*a/(b*n) + 2*log(e*x + d))*e^(-2*a/(b*n))/ 
(b*c^(2/n)*e^2*n) - 2*d*g^2*Ei(2*log(c)/n + 2*a/(b*n) + 2*log(e*x + d))*e^ 
(-2*a/(b*n))/(b*c^(2/n)*e^3*n) + g^2*Ei(3*log(c)/n + 3*a/(b*n) + 3*log(e*x 
 + d))*e^(-3*a/(b*n))/(b*c^(3/n)*e^3*n)
 
3.1.89.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx=\int \frac {{\left (f+g\,x\right )}^2}{a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )} \,d x \]

input
int((f + g*x)^2/(a + b*log(c*(d + e*x)^n)),x)
 
output
int((f + g*x)^2/(a + b*log(c*(d + e*x)^n)), x)